<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:tiles="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3" lang="en">
<head>
<title>page1.html</title>

<meta name="keywords" content="keyword1,keyword2,keyword3" />
<meta name="description" content="this is my page" />
<meta name="content-type" content="text/html; charset=UTF-8" />

</head>
<body tiles:fragment="content">
	Page2 info Base Controller
	<table border="1px solid">
		<tr>
			<td>th:text</td>
			<td th:text="${site}">xx</td>
		</tr>
		<tr>
			<td>th:utext</td>
			<td th:utext="#{home.welcome}">xx</td>
		</tr>
		<tr>
			<td>I18N</td>
			<td th:utext="#{plane.name.too.min}">xx</td>
		</tr>
		<tr>
			<td>site</td>
			<td th:text="${site}">xx</td>
		</tr>
		<tr>
			<td>Iterater</td>
			<td><span th:each="u: ${users}"> <b th:text="${u['userName']}">b</b>
			</span></td>
		</tr>
		<tr>
			<td>Iterater2</td>
			<td><span th:each="u,uStatus : ${users}"> <b th:text="${u.userName}" th:class="${uStatus.odd}?'xxx'"></b>
			</span></td>
		</tr>
		<tr>
			<td>Iterater[0]</td>
			<td th:text="${users.get(0)['userName']}"></td>
		</tr>
		<tr>
			<td>Today #dates</td>
			<td th:text="${#dates.format(today, 'yyyy/MM/dd')}"></td>
		</tr>
		<tr>
			<td>Today #dates2</td>
			<td th:text="${{(today)}}"></td>
		</tr>
		<tr>
			<td>Today autoConvert only object</td>
			<td th:text="${{user.createDate}}"></td>
		</tr>
		<tr>
			<td>Today autoConvert for book</td>
			<td th:text="${{book.publishDate}}"></td>
		</tr>
		<tr>
			<td>Defaul t: (value) ?: (defaultvalue)</td>
			<td th:text="${xx}?:'unKnow'"></td>
		</tr>
	</table>

	= = Attribute = =
	<table border="1px solid">
		<tr>
			<td>User</td>
			<td th:object="${user}">name:<span th:text="*{userName}"></span> pass:<span th:text="*{password}"></span>
			</td>
		</tr>
		<tr>
			<td>Session User</td>
			<td th:object="${session.user}">name:<span th:text="${#object.userName}"></span> pass:<span th:text="*{password}"></span>
			</td>
		</tr>
		<tr>
			<td>href</td>
			<td><a th:href="@{http://www.baidu.com(wd='xxx')}">hhh</a></td>
		</tr>
		<tr>
			<td>+</td>
			<td><span th:text="1+1"></span> <span th:text="${'omg'+'xxx'}"></span></td>
		</tr>
		<tr>
			<td>boolean</td>
			<td><span th:if="${isAdmin}">true</span> <span th:if="${!isAdmin}">false</span></td>
		</tr>
		<tr>
			<td>null</td>
			<td><span th:if="${user.role == null}">true</span></td>
		</tr>
		<tr>
			<td>class</td>
			<td th:class="'class1'"><span th:text="${user}"></span></td>
		</tr>
		<tr>
			<td>Literal substitutions</td>
			<td th:text="'welcome '+' xxx'"></td>
		</tr>
		<tr>
			<td>th:with</td>
			<td th:with="newP=${isAdmin},newO='xxx'"><span th:text="${newP + newO}"/></td>
		</tr>
		<tr>
			<td>|</td>
			<td><span th:text="|Welcome to our application ${user.userName}|"> Welcome to our application time; </span></td>
		</tr>
		<tr>
			<td>not null</td>
			<td th:if="not ${user.role}">1==0</td>
		</tr>
		<tr>
			<td>compared</td>
			<td th:if="1 > 0 and 1 gt 0 and 0 eq 0">1>0</td>
		</tr>
		<tr>
			<td>th:unless</td>
			<td th:unless="1 eq 0">1 == 0</td>
		</tr>
		<tr>
			<td>th:remove(all-but-first,tag,body,all)</td>
			<td th:remove="all-but-first" class="class1">
				<span>remove1</span>
				<span>remove2</span>
			</td>
		</tr>
		<tr>
			<td>th:inline text</td>
			<td th:inline="text">
				Hello,[[${session.user.userName}]]
			</td>
		</tr>
		<tr>
			<td>th:inline javascript</td>
			<td>
				<script th:inline="javascript">
				/*<![CDATA[*/
					var userName = /*[[${session.user}]]*/ null;
					/*[+
					var msg  = 'This is a working application';
					+]*/
					var msg1  = 'This is a working application';
					/*[-
					   var msg2 = 'mmmm2';
					-]*/
				/*]]>*/
				</script>
			</td>
		</tr>
	</table>
	<!--/* This code will be removed at thymeleaf parsing time! */-->
	<!--/*/
	<div th:text="${'x'}"></div>
	/*/-->

	th:block 
	<table border="1px solid">
		<!--/*/ <th:block th:each="user : ${users}"> /*/-->
		<tr>
			<td th:text="${user.password}">...</td>
			<td th:text="${user.userName}">...</td>
		</tr>
		<!--/*/ </th:block> /*/-->
	</table>
</body>
</html>
